package org.x.user.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;

import java.lang.Long;
import java.util.Date;
import java.lang.Object;
import java.lang.String;

/**
 * 操作日志表 实体类。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
@Table(value = "sys_log")
public class SysLogEntity {

    /**
     * 日志ID
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 操作用户ID
     */
    @Column(value = "user_id")
    private Long userId;

    /**
     * 操作类型（如：DELETE_USER）
     */
    @Column(value = "action")
    private String action;

    /**
     * 操作对象类型（如：user）
     */
    @Column(value = "target_type")
    private String targetType;

    /**
     * 操作对象ID
     */
    @Column(value = "target_id")
    private Long targetId;

    /**
     * 变更详情（旧值/新值）
     */
    @Column(value = "detail")
    private Object detail;

    /**
     * 操作IP
     */
    @Column(value = "ip")
    private String ip;

    /**
     * 操作时间
     */
    @Column(value = "created_time")
    private Date createdTime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getTargetType() {
        return targetType;
    }

    public void setTargetType(String targetType) {
        this.targetType = targetType;
    }

    public Long getTargetId() {
        return targetId;
    }

    public void setTargetId(Long targetId) {
        this.targetId = targetId;
    }

    public Object getDetail() {
        return detail;
    }

    public void setDetail(Object detail) {
        this.detail = detail;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }
}
